$OpenBSD: patch-ext_spl_php_spl_c,v 1.1.1.1 2013/08/07 16:35:45 robert Exp $
--- ext/spl/php_spl.c.orig.port	Wed Jul  3 08:10:53 2013
+++ ext/spl/php_spl.c	Sat Jul 27 18:39:50 2013
@@ -775,7 +775,7 @@ PHP_FUNCTION(spl_object_hash)
 
 PHPAPI void php_spl_object_hash(zval *obj, char *result TSRMLS_DC) /* {{{*/
 {
-	intptr_t hash_handle, hash_handlers;
+	zend_intptr_t hash_handle, hash_handlers;
 	char *hex;
 
 	if (!SPL_G(hash_mask_init)) {
@@ -783,13 +783,13 @@ PHPAPI void php_spl_object_hash(zval *obj, char *resul
 			php_mt_srand(GENERATE_SEED() TSRMLS_CC);
 		}
 
-		SPL_G(hash_mask_handle)   = (intptr_t)(php_mt_rand(TSRMLS_C) >> 1);
-		SPL_G(hash_mask_handlers) = (intptr_t)(php_mt_rand(TSRMLS_C) >> 1);
+		SPL_G(hash_mask_handle)   = (zend_intptr_t)(php_mt_rand(TSRMLS_C) >> 1);
+		SPL_G(hash_mask_handlers) = (zend_intptr_t)(php_mt_rand(TSRMLS_C) >> 1);
 		SPL_G(hash_mask_init) = 1;
 	}
 
-	hash_handle   = SPL_G(hash_mask_handle)^(intptr_t)Z_OBJ_HANDLE_P(obj);
-	hash_handlers = SPL_G(hash_mask_handlers)^(intptr_t)Z_OBJ_HT_P(obj);
+	hash_handle   = SPL_G(hash_mask_handle)^(zend_intptr_t)Z_OBJ_HANDLE_P(obj);
+	hash_handlers = SPL_G(hash_mask_handlers)^(zend_intptr_t)Z_OBJ_HT_P(obj);
 
 	spprintf(&hex, 32, "%016x%016x", hash_handle, hash_handlers);
 
